package com.pphh.demo.strategy;

/**
 * Please add description here.
 *
 * @author huangyinhuang
 * @date 9/25/2018
 */
public class ModShardStrategy implements ShardStrategy {

    @Override
    public String calculateDbShard(Long id) {
        return String.valueOf(id % 2);
    }

    @Override
    public String calculateTableShard(Long id) {
        return String.valueOf(id % 2);
    }
}
